From 49ee07f93dc3281084247b77eb7653a2bad5fad8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 30 Sep 2022 14:02:31 -0400 Subject: [PATCH] fix flush of a closed file handle Avoids displaying warning about git-annex restage needing to be run in situations where it does not. Closing a handle flushes it anyway, so no need for an explict flush. The handle does get closed twice, but that's fine, the second one does nothing. Sponsored-by: Dartmouth College's DANDI project --- CHANGELOG | 7 +++++++ Git/UpdateIndex.hs | 1 - ...8___needlessly_reminded_to_run___96__restage__96__.mdwn | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index e805419551..e077b498ad 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +git-annex (10.20220928) UNRELEASED; urgency=medium + + * Avoid displaying warning about git-annex restage needing to be run + in situations where it does not. + + -- Joey Hess Fri, 30 Sep 2022 13:54:23 -0400 + git-annex (10.20220927) upstream; urgency=medium * Fix a bug in the last release that caused v8 repositories to upgrade diff --git a/Git/UpdateIndex.hs b/Git/UpdateIndex.hs index ee34afe983..0ac21617fb 100644 --- a/Git/UpdateIndex.hs +++ b/Git/UpdateIndex.hs @@ -160,7 +160,6 @@ refreshIndex repo feeder = bracket go (Just h, _, _, pid) = do let closer = do - hFlush h hClose h forceSuccessProcess p pid feeder $ \case diff --git a/doc/bugs/windows__58___needlessly_reminded_to_run___96__restage__96__.mdwn b/doc/bugs/windows__58___needlessly_reminded_to_run___96__restage__96__.mdwn index bc1bbf8a50..4b4c10d4d4 100644 --- a/doc/bugs/windows__58___needlessly_reminded_to_run___96__restage__96__.mdwn +++ b/doc/bugs/windows__58___needlessly_reminded_to_run___96__restage__96__.mdwn @@ -178,3 +178,5 @@ Git Annex is great. I use it several times a week with my multigigabyte backups, Big thanks, Joey! [[!meta author=jkniiv]] + +> [[fixed|done]] --[[Joey]] -- 2.30.2